class sort {
    public:
        void quick_sort(int a[], int n);
        void heap_sort(int a[], int n);
        void combine_sort(int a[], int n);
        void bubble_sort(int a[], int n);
        void select_sort(int a[], int n);
        void insert_sort(int a[], int n);
        void print(int a[], int n);
        int bsearch(int a[], int n, int key);
    private:
        inline void swap(int &a, int &b){int tmp = a; a = b; b = tmp;}

        // for heap_sort
        void adjust_down(int a[], int beg, int lim);
        void mkheap(int a[], int n);

        // for quick_sort
        int partition(int a[], int n);
};
